# Setup the initial environment 
import os
env = Environment(ENV = os.environ)
conf = Configure(env)

# Where are the frameworks?
FRAMEWORKS_LOCATION = '-F./build/Mangofish.app/Contents/Frameworks/'

# Library information
clanlib_frameworks = '-framework ClanLib -framework ClanCore -framework ClanApp -framework ClanDisplay -framework ClanGL'

env.Append(CXXFLAGS = 
	FRAMEWORKS_LOCATION + ' ' + clanlib_frameworks
	+ ' -Ibuild/headers'
	)
env.Append(LINKFLAGS = FRAMEWORKS_LOCATION + ' ' + clanlib_frameworks)

# CONFIGURE checks go here
# env = conf.Finish()

# MAKE
# Library files

# Source files
files_application = [
	'application/main.cpp', 
	'application/MangoFishGame.cpp',
	'model/Sprite.cpp',
	'model/World.cpp',
	'model/Hero.cpp'
]
src_files = files_application + []

# Common header files aren't picked up by the scanner.
Depends(src_files, Glob('headers/*.h'))

env.Program(
	target = 'Mangofish.app/Contents/MacOS/Mangofish', 
	source = src_files
)

# Copy resources into place
env.Command(
	'./Mangofish.app/Contents/Resources',
	'../resources',
	Copy("$TARGET", "$SOURCE")
)

# OTHER TARGETS
Help("""
Help text goes here
""")
